package com.lmonkey.servlet.my;

import com.lmonkey.servic.ADDRESSDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/shangc/moren")
public class MoRen extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //设置字符集
        request.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=utf-8");
        //获取数据
        String name = request.getParameter("name");
        String name1 = request.getParameter("name1");
        String id = request.getParameter("id");
        String eids = request.getParameter("ids");
        System.out.println(id);
        //进行修改默认地址
        ADDRESSDao.updateMoren(name,name1,id);

        response.sendRedirect("orderselect?eids="+eids);
    }
}
